import {createRouter, createWebHistory} from 'vue-router'

// 引入layout界面
import layout from '@/views/Layout/index.vue'

// 引入home界面
import home from '@/views/Home/index.vue'

// 引入chat component
import chat from '@/views/Chat/index.vue'

// 引入knowledge component
import knowledge from '@/views/Knowledge/index.vue'

// 引入prompt component
import prompt from '@/views/Prompt/index.vue'

// 引入API component
import api from '@/views/API/index.vue'

// 测试markdown界面
import md from '@/views/Chat/components/ShowMarkDown.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            component: layout,
            children: [
                {
                    path: '',
                    component: home,
                    children: [
                        {
                            path: '',
                            component: chat
                        },
                        {
                            path: 'kb',
                            component: knowledge
                        },
                        {
                            path: 'prompt',
                            component: prompt
                        },
                        {
                            path: 'api',
                            component: api
                        }
                    ]
                }
            ]
        },
        {
            path: "/md",
            component: md
        }
    ]
})


export default router
